<template>
  <el-button v-bind="$attrs" ref="btnRef" v-ripple>
    <template v-for="(item, key) in $slots" :key="key" #[key]="scoped">
      <slot :name="key"></slot>
    </template>
  </el-button>
</template>

<script>
import ripple from '../../directives/ripple/ripple'
export default {
  directives: {
    ripple
  },
  mounted() {
    const btnRef = this.$refs.btnRef
    Object.keys(btnRef).forEach((key) => {
      this[key] = btnRef[key]
    })
  }
}
</script>
